package luogu.editor;

import java.util.Arrays;
import java.util.Scanner;

public class P10387 {
    // https://www.luogu.com.cn/problem/P10387
}
class Main {
    static int result = 0;
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();// n人
        Long s = sc.nextLong();// 组团花费
        Long[] p = new Long[n];// 个人训练花费
        Long[] c = new Long[n];// 个人所需训练次数
        for(int i = 0; i < n; i++){
            p[i] = sc.nextLong();
            c[i] = sc.nextLong();
        }
        
        System.out.println(result);
    }
    // DFS
}